home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
libsrc11.arc
/
RDBYTSC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-04-27
|
691b
|
33 lines
/* rdbytsc.c 4.3 */
/*F****************************************************************************
FUNCTION NAME: rdbytsc
ACTION: Reads a character from Port C using simple strobed I/O.
Returns a character.
PARAMETERS: (None)
RETURNS: (int) byte read from port C.
******************************************************************************/
#include <hc11/io.h>
#include <hc11/pio.h>
#include <hc11/directives.h>
SMALL
unsigned rdbytsc()
{
HC11.PIOC &= (~HNDS); /* clear the Handshake bit */
while ((HC11.PIOC & STAF) == 0) /* wait for the data */
; /* null statement */
return ((unsigned) HC11.PORTCL) ;
} /* end of rdbytsc */